﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StudentClass
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("How many students?");
            int studentsCount = Int32.Parse(Console.ReadLine());
            Student[] arrayStudents = new Student[studentsCount];

            for(int i = 0; i < studentsCount; i++)
            {
                Console.Clear();
                arrayStudents[i] = new Student();
                arrayStudents[i].InputStudentsFromConsole();
            }
            Console.Clear();

            for (int i=0; i < studentsCount; i++)
            {
                if (arrayStudents[i].AverageEvaluationForStudent() > 67)
                {
                    arrayStudents[i].PrintStudentsToConsole();
                }
            }



        }
    }

    class Student
    {
        public string firstName;
        public string surName;
        public int classNumber;
        public int[] evaluations = new int[10];

        public void InputStudentsFromConsole()
        {
            Console.WriteLine("Enter student's first name");
            firstName = Console.ReadLine();
            Console.WriteLine("Enter student's surname");
            surName = Console.ReadLine();
            Console.WriteLine("Enter student's class number");
            classNumber = Int32.Parse(Console.ReadLine());

            for (int i = 0; i < 10; i++)
            {
                Console.Write("Enter evaluation {0} for the student ", i+1);
                evaluations[i] = Int32.Parse(Console.ReadLine());
            }
        }

        public void PrintStudentsToConsole()
        {
            Console.WriteLine("Student's {0} {1} of class {2} average mark is {3}", firstName, surName, classNumber, AverageEvaluationForStudent());
        }

        public double AverageEvaluationForStudent()
        {
            return evaluations.Average();
        }
    }
}
